/**
 * @Author: 陈瑞鹏
 * @Date:   2023-01-07 09:50:00
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2023-01-10 16:23:17
 */
import mongoose from "mongoose";

const Schema = mongoose.Schema;
const EmailSchema: mongoose.Schema = new Schema({
  roleId: { type: Number, display: "角色id", index: true },
  isRecive: { type: Boolean, display: "是否领取", default: false },
  title: { type: String, display: "标题" },
  desc: { type: String, display: "描述" },
  rewardArr: { type: Array, display: "奖励数组" },
  type: { type: Number, display: "类型" },
  isDel: { type: Boolean, display: '是否删除', default: false },
  updateTime: { type: String, display: '更新时间' },
  createTime: { type: String, display: '创建时间' },
}).index({ roleId: 1, isDel: 1 }).index({ roleId: 1, isRecive: 1 }).index({ roleId: 1, isDel: 1, createTime: -1 }).index({ roleId: 1, isRecive: 1, isDel: 1 });

const Email = mongoose.model('Email', EmailSchema);
export default Email;